package com.ahoi.common.utils;

import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.io.IOException;

public class JsoupUtils {
    private static Logger logger = LoggerFactory.getLogger(JsoupUtils.class);

    public static Document loadURL(String url) {
        try {
            return Jsoup.connect(url).get();
        } catch (IOException e) {
//            e.printStackTrace();
            logger.info("url request error: " + url);
        }
        return null;
    }

}
